package com.wc.AlgoOJ_homework.AlgoOJ_HomeWork2.O_最少砝码;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

/**
 * @Author congge
 * @Date 2024/3/6 9:28
 * @description http://43.138.190.70:8888/p/LQ1209?tid=65e6b15c27489dab814f8d41
 */
public class Main {
    static FastReader sc = new FastReader();
    static PrintWriter out = new PrintWriter(System.out);
    static int N = 31;
    static long[] base = new long[N];


    public static void main(String[] args) {
        base[0] = 1;
        for (int i = 1; i < N; i++) base[i] = base[i - 1] * 3;
        int n = sc.nextInt();
        int res = 1;

        // 前面的砝码能表示1 ~ x 则后面加一个x + 1,就可以以表示 2 * x + 1
        // 第一个砝码一定是1,则二个砝码就是 3,一共能表示就是1 ~ 4,第三个砝码就是4 * 2 + 1 = 9
        // 以此类推 就是 1 3 9 27 。。。过去，也就是3的次方能表示最大
        while ((base[res] - 1) / 2 < n) {
            res++;
        }
        out.println(res);
        out.flush();
    }
}


class FastReader {
    StringTokenizer st;
    BufferedReader br;

    FastReader() {
        br = new BufferedReader(new InputStreamReader(System.in));
    }

    String next() {
        while (st == null || !st.hasMoreElements()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return st.nextToken();
    }

    int nextInt() {
        return Integer.parseInt(next());
    }

    String nextLine() {
        String s = "";
        try {
            s = br.readLine();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return s;
    }

    long nextLong() {
        return Long.parseLong(next());
    }

    double nextDouble() {
        return Double.parseDouble(next());
    }

    // 是否由下一个
    boolean hasNext() {
        while (st == null || !st.hasMoreTokens()) {
            try {
                String line = br.readLine();
                if (line == null)
                    return false;
                st = new StringTokenizer(line);
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return true;
    }
}